package com.kingschan.jeasytag.core.parse.properties.impl;

import java.lang.reflect.Field;
import com.kingschan.jeasytag.core.annotations.tag.*;
import com.kingschan.jeasytag.core.parse.properties.PropertiesParse;

public class StringFieldParseImpl implements PropertiesParse {

	@Override
	public String parse(Field f, Object obj) throws Exception {
		StringField s = f.getAnnotation(StringField.class);
		StringBuffer sb = new StringBuffer()
		.append(f.getName()).append(":").append(s.appendFlag()).append(obj.toString()).append(s.appendFlag());
		return sb.toString();
	}

}
